package com.hitqz.robot.api.business.enums;

import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * 设备品牌
 * @author wengyx
 * @date 2024/8/7
 */
public enum BrandEnum {

    //相机云台
    HK("HK", "海康"),
    DH("DH", "大华"),
    PELCOD("PELCOD","PELCO-D协议"),

    //机械臂
    JAKA("JAKA", "节卡"),
    DOBOT("DOBOT", "越疆"),
    REALMAN("REALMAN", "瑞尔曼"),
    ROKAE("ROKAE", "珞石"),
    //其他
    HIT_CHIP("HIT_CHIP","HIT嵌入式"),
    CAR_PLC("CAR_PLC", "车载PLC"),
    OIL_PLC("OIL_PLC", "取油柜PLC"),

    ;

    public final static Map<String, String> EN_CN_MAP = Stream.of(BrandEnum.values())
            .collect(Collectors.toMap(BrandEnum::getEnStr,BrandEnum::getCnStr));

    private static final Map<String, BrandEnum> MAP = Stream.of(BrandEnum.values())
            .collect(Collectors.toMap(BrandEnum::getEnStr, v -> v));


    private String enStr;

    private String cnStr;


    BrandEnum(String enStr, String cnStr){
        this.enStr = enStr;
        this.cnStr = cnStr;
    }

    public String getCnStr() {
        return cnStr;
    }

    public String getEnStr() {
        return enStr;
    }

    public static BrandEnum getByType(String code) {
        return MAP.get(code.toUpperCase());
    }

}
